package com.dashunwms_aohe.job;

import com.dashunwms_aohe.bean.ds.DS_StockYHJLRes;
import com.dashunwms_aohe.dao.InStockBillDao;
import com.dashunwms_aohe.dao.OutStockBillDao;
import com.dashunwms_aohe.http.dto.GetDS_YHJLDto;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@Configuration      //1.主要用于标记配置类，兼备Component的效果。
@EnableScheduling   // 2.开启定时任务
public class AutoExecPro {

    @Resource
    private InStockBillDao inStockBillDao;
    @Resource
    private OutStockBillDao outStockBillDao;

    //TODO 自动执行出入库回写寸出过程
    @Scheduled(fixedDelay = 300000)//1000=1秒
    public void execPro() {

        inStockBillDao.execZxy_dsInStockBackWrite();
        outStockBillDao.execZxy_dsOutStockBackWrite();
    }
}
